#!/usr/bin/env python

import poncrpc.rpc as rpc
from dDS import *

class phaseOffsetsClass:
    def __init__(self):
        self.phases = {}
        self.phaseOffsets = []
        for i in range(11):
            self.phases[i] = 0
            self.phaseOffsets.append(0)

    def setPhases(self, phases):
        for i in phases:
            self.phases[i] = phases[i]
            self.phaseOffsets[i] = phases[i]


class DDSClient(DDSPROG_1_Stubs, rpc.TCPClient):
    def __init__(self, host='newdds'):
        self.host = host
        rpc.TCPClient.__init__(self, host, DDSPROG_1.prog, 1)
        
    def ddsPAPUpdate(self, phaseOffsetsClassInstance):
        res = self.ddspapupdate(phaseOffsetsClassInstance)
        return res
